package com.dxy.dxyproduct.repository;

import com.dxy.dxyproduct.DO.ProductCategory;
import org.springframework.data.jpa.repository.JpaRepository;

import java.math.BigInteger;
import java.util.List;

public interface ProductCategoryRepository extends JpaRepository<ProductCategory,Integer> {


    ProductCategory findByCategoryId(Integer pId);

    int deleteByCategoryType(BigInteger categoryType);

    ProductCategory findByCategoryType(BigInteger categoryType);

    List<ProductCategory> findByParentId(Integer categoryId);


    boolean existsByCategoryId(Integer parentId);
}
